package cn.demoncat.util.mysql.entity;

import org.apache.commons.lang3.StringUtils;

/**
 * 代码生成 - 数据库连接参数
 * 
 * @author 延晓磊
 *
 * @since 2019年8月23日
 */
public class DbGenParam {

	// 数据库名
	private String name;
	// IP
	private String ip;
	// 端口
	private Integer port = 3306;
	// 用户名
	private String username;
	// 密码
	private String password;

	public DbGenParam(String name, String ip, String username, String password) {
		super();
		this.name = name;
		this.ip = ip;
		this.username = StringUtils.isBlank(username) ? "root" : username;
		this.password = password;
	}

	public DbGenParam() {
		super();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
